set more off
capture log close
cd *** Fill in path name here ***

//  program:    AnanatEtAl_income-college attenance gradient results
//  task:		Regressions of income-colleage attendance gradient on job loss ages 12-17, pre-Great Recession years only

log using *** Fill in file name here ***, replace text

**** ALL CHILDREN ****; 
// #1
// Load data
use AnanatEtAl_income_college_data.dta, clear

// #2
// Run IV regressions of income-college gradient on job losses
// Weighted by number of children and total black population
// Pre-Great Recession years only 
ivreg2 collegeage19slope stated1-stated51 yeard* (JL_lagged1217sep = JL_lagged1217tic)[fw=numberofchildren] if year < 2010, cluster (stateno) first

ivreg2 collegeage19slope stated1-stated51 yeard* (JL_lagged1217sep = JL_lagged1217tic) [fw=tot_black] if year < 2010, cluster (stateno) first

clear

log close
